home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
668
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
1KB
Path: chaos.kulnet.kuleuven.ac.be!usenet
From: christian.felique@student.kuleuven.ac.be (christian felique)
Newsgroups: comp.std.c
Subject: Close all opened files in C ?
Date: 29 Mar 1996 11:44:42 GMT
Organization: Katholieke Universiteit Leuven
Message-ID: <4jgifa$fjd@chaos.kulnet.kuleuven.ac.be>
NNTP-Posting-Host: cc399.cc.kuleuven.ac.be
X-Newsreader: WinVN 0.92.6+
I am using a shareware C routine to play a sound sample
throught the PC speaker.
SoundPlay("SAMPLE.VOC",delay,twiddle);
I think that the programmer
of the routine has forgotten to take care of closing the sample file
after it is played, because the routine will not work anymore after a few
calls (about 10 calls) (It displays an Out of Memory message)
I think that the Out of Memory error has got nothing to
do with the size of a sound sample file, because:
* You can call the routine for about 10 times using a small sample.
* " " " " " """"""""""""""10 """"""""""""large """""""
According to me, the reason for the out of memory error
is the fact that there are too many file buffers open .
NOW THIS IS MY QUESTION:
How can I close all files that are opened ?
I can't use fclose(...) because fclose needs a file pointer as
an argument.
If you know how to solve this problem in Quick C or
inline assembly. Then send me your answer
to:
CHRISTIAN.FELIQUE@STUDENT.KULEUVEN.AC.BE